
import { Cell, Edge, Graph, Node, ObjectExt } from '@antv/x6';


export const WfEdge = Graph.registerEdge(
  'wf-edge',
  {
    // inherit: 'edge',
    attrs: {
      line: {
        stroke: '#5755a1',
      },
    },
    defaultLabel: {
      markup: [
        {
          tagName: 'rect',
          selector: 'body',
        },
        {
          tagName: 'text',
          selector: 'label',
        },
      ],
      attrs: {
        label: {
          fill: 'black',
          fontSize: 14,
          textAnchor: 'middle',
          textVerticalAnchor: 'middle',
          pointerEvents: 'none',
        },
        body: {
          ref: 'label',
          fill: 'white',
          stroke: '#5755a1',
          strokeWidth: 2,
          rx: 4,
          ry: 4,
          refWidth: '140%',
          refHeight: '140%',
          refX: '-20%',
          refY: '-20%',
        }
      },
      position: {
        distance: 80,
        options: {
          absoluteDistance: false,
          reverseDistance: true,
        },
      },
    },
    labels: ['❓'],
    data: {
      btnTrigger: [],
      voiceTrigger: [],
    },
  },
  true,
);
